package com.lp.common;

import com.fasterxml.jackson.databind.ObjectMapper;

import java.util.ArrayList;
import java.util.List;

public class Result {

    private short success=Short.valueOf("1");
    private String  errorStr="";
    private String  errorCode="";
    private String sessionId="";
	private Object  data;



    public String getSessionId() {
		return sessionId;
	}

	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}
    public short getSuccess() {
        return success;
    }

    public void setSuccess(short success) {
        this.success = success;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

   public static void  main(String[] args) throws  Exception{
       Result r=new Result();
      List list =new ArrayList();
      list.add("aa");
      list.add(Integer.valueOf("12"));
      r.setData(list);
       ObjectMapper mapper = new ObjectMapper();
       System.out.println(mapper.writeValueAsString(r));;
   }

    public String getErrorStr() {
        return errorStr;
    }

    public void setErrorStr(String errorStr) {
        this.errorStr = errorStr;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }
}
